package com.tous.tool;

import com.tous.modules.service.UdpServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication(scanBasePackages = {"com.tous"})
public class ModelApplication implements CommandLineRunner {

    @Autowired
    private UdpServer udpServer;

    public static void main(String[] args) {
        SpringApplication.run(ModelApplication.class, args);
    }


    @Override
    public void run(String... args) throws Exception {
        // 启动UDP服务器
        udpServer.start();
    }
}
